/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include <basic_vec.h>
#include <cmath>


Inline void f_graph_buildCircular(const vec2 c, const float32 r, uint32 n, vec2* circular, float32 angleArce = 360.0f, float32 angleOffset = 0) {
	float32 度数 = (angleArce / n);
	for (uint32 i = 0; i < n; ++i) {
		circular[i].x = c.x + cos(radians((float32)i * 度数 + angleOffset)) * r;
		circular[i].y = c.y + sin(radians((float32)i * 度数 + angleOffset)) * r;
	}
}








